<!DOCTYPE>
<html>
	<head>
		<meta charset='ust-8'>
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<style>
		*{
			padding:0;
			margin:0;
		}
			.head{
				width:100%;
			}
			.head img{
				width:100%;
			}
			
			.content{
				display:flex;
				 flex-direction:column;
			}
			.user_input,.button{
				display:flex;
				justify-content:center;
				height:3rem;
				margin-top:2rem;
			}
			.user_input input{
				border-radius:.5rem;
				border:1px solid #bbb;
				width:80%;
				
			}
			.button button{
				width:80%;
				border-radius:.5rem;
				background-color:#fed200;
				border:1px solid #bbb;
			}
		</style>
	</head>
	<body>
		<div class='head'>
			<a href = "https://m.10010.com/pushpage/69800000320983.36.html?WT.mc_id=zhejiang_zhejiang_517zhengshi_0515_H5_0001&utm_source=zhejiang&utm_medium=cpc&utm_term=&utm_content=jpg&utm_campaign=zhejiang_zhejiang_517zhengshi_0515_H5_0001"><img src='/static/home/img/jiangpin.jpg'></a>
		</div>
		<div class='content'>
			<div class='user_input'>
				<input type='tel' id='phone' placeholder='请输入手机号' maxlength=11>
			</div>
			<div class='button'>
				<button onclick='lingqu()'>立即领取</button>
			</div>
		</div>
		<script src="/static/common/js/jquery-2.1.4.min.js"></script>
		<script src='/static/layer-v3.1.1/layer/mobile/layer.js'></script>
		<script>
			var id = {{lid}};
			function lingqu(){
				var phone = $('#phone').val();
				if(  !phone  ){
					layer.open({
						content: '手机号不能为空'
						,btn: '我知道了'
					});
				}
				$.ajax({
					url:'/home/linjiang',
					type:'post',
					dataType:'json',
					data:{lid:id,phone:phone},
					success:function( data  ){
						layer.open({
							content: data.message
							,skin: 'msg'
							,time: 3 //2秒后自动关闭
						  });
						if( data.code == 0 ){
							window.location.href = '/home/jiangping.html';
						}
					}
					
				})
			}
		</script>
	</body>
</html>